package com.rongji.cms.tools.websocket.config.properties;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author yang
 * @date 2023/2/6 13:44
 * @description socketio配置项
 */
@Data
@Component
@ConfigurationProperties(prefix = "socketio")
public class SocketioProperties {

    /**
     * socketio服务器host
     */
    private String host;

    /**
     * socketio服务器port
     */
    private Integer port;

    /**
     * boss线程数？
     */
    private int bossCount;

    /**
     * 工作线程数？
     */
    private int workCount;

    /**
     * Allow to service custom requests that differ from socket.io protocol, defaults to false.
     */
    private boolean allowCustomRequests;

    /**
     * 协议升级超时时间（毫秒），默认10000。HTTP握手升级为ws协议超时时间
     */
    private int upgradeTimeout;

    /**
     * ping超时时间？
     */
    private int pingTimeout;

    /**
     * ping超时时间？
     */
    private int pingInterval;
}
